package cn.bugstack.springframework.beans.factory.config;

import java.util.HashMap;
import java.util.Map;

public class DefaultSingletenBeanRegistry implements SingletonBeanRegistry{


    private final Map<String,Object> singletonObjects = new HashMap();


    @Override
    public Object getSingleton(String beanName) {
        return singletonObjects.get(beanName);
    }


    protected void addSingleton(String beanName,Object singletonObject){
        singletonObjects.put(beanName,singletonObject);
    }
}
